{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<script language="javascript" type="text/javascript" src="{res file=js/common.js}"></script>
<script language="JavaScript" type="text/javascript" src="{res file=js/lan.js}"></script>
<script language="javascript" type="text/javascript" src="{res file=DatePicker/WdatePicker.js}"></script>
<script language="javascript" type="text/javascript" src="{res file=js/jquery.funkyUI.js}"></script>
<link href="template/style/css/style.css" type="text/css" rel="stylesheet" />
<body>
<div class="sub-body" style="width: 800px">
	<div class="tab_info">
		<div class="tab-title-1"><span>查看清单</span></div>
		<form method="post" action="">
		<table cellspacing="0" cellpadding="0" id="tab-color2" class="tab-display">
			<tbody>
				<tr>
					<td colspan="11"><h3>{$recons.order_release_start|date}至{$recons.order_release_end|date}&nbsp;&nbsp;COMMERCIAL INVOICE 对账单</h3></td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellspacing="0" cellpadding="0" style="width: 100%">
							<tr>
								<td align="left">Form：{$factory_info.factory_name}</td>
							</tr>
							<tr>
								<td align="left">地址：{$factory_info.address|escape}</td>
							</tr>
							<tr>
								<td align="left">电话：{$factory_info.phone_mob|escape}</td>
							</tr>
						</table>
					</td>
					<td colspan="5">
						<table cellspacing="0" cellpadding="0" style="width: 100%">
							<tr>
								<td align="left">TO：YUANSE FASHION CO,LTD</td>
							</tr>
							<tr>
								<td align="left">地址：广州市海珠区黄埔路42号之二石基科技园3栋4楼</td>
							</tr>
							<tr>
								<td align="left">电话：020-34076728</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<th width="6%">序号</th>
					<th width="7%" type="order" field="factory_name" order="ASC">工厂</th>
					<th width="10%" type="order" field="release_date" order="ASC">工厂入仓日期</th>
					<th width="10%">订单号</th>
					<th width="7%">款号</th>
					<th width="7%" type="order" field="brand_name" order="ASC">品牌</th>
					<th width="7%" type="order" field="merchandiser" order="ASC">跟单</th>
					<th width="8%">工厂价格</th>
					<th width="10%">实际出货件数</th>
                    <th width="8%">折扣金额</th>
                    <th width="10%">实际支付金额</th>
				</tr>
				<!--{foreach from=$order_list item=order name=o}-->
				<tr>
					<td>{$smarty.foreach.o.iteration}</td>
					<td>{$order.factory_name}</td>
                    <td>{$order.release_date|date}</td>
					<td><a href="{url app=order&act=view&id=$order.order_id}"  style="color:blue">{$order.order_sn|default:-}</a></td>
					<td>{$order.style_sn}</td>
					<td>{$order.brand_name}</td>
					<td>{$order.merchandiser}</td>
					<td>{$order.factory_price}</td>
					<td>{$order.ship_count}</td>
                    <td>{$order.goods_discount}</td>
					<td>{$order.ship_amount}</td>
				</tr>
				<!--{/foreach}-->
				<tr>
					<td>合计：</td>
					<td colspan="9">&nbsp;</td>
					<td>{$total.total_ship|default:0}<input name="total_ship" value="{$total.total_ship|default:0}" type="hidden" /></td>
				</tr>
			</tbody>
		</table>
		<div style="margin: 5px 5px">&nbsp;&nbsp;</div>
		<input name="return_arr" value="{$return_arr_id}" type="hidden" />
		<table cellspacing="0" cellpadding="0" id="tab-color2" class="tab-display" style="width: 800px">
			<tbody>
				<tr>
					<td colspan="9"><h3>{$lang.deduct_detail}</h3></td>
				</tr>
				<tr>
					<th width="10%">序号</th>
					<th width="10%">品牌</th>
					<th width="7%">订单号</th>
					<th width="7%">款号</th>
					<th width="10%">出货日期</th>
					<th width="7%">单价</th>
					<th width="7%">件数</th>
                    <th width="10%">状态</th>
                    <th width="10%">金额</th>
				</tr>
				<!--{foreach from=$order_return item=ret name=ort}-->
				<tr>
					<td>{$smarty.foreach.ort.iteration}</td>
					<td>{$ret.brand_name}</td>
					<td><a href="{url app=order&act=view&id=$ret.order_id}"  style="color:blue">{$ret.order_sn}</a></td>
                    <td>{$ret.style_sn}</td>
					<td>{$ret.release_date|date}</td>
					<td>{$ret.factory_price}</td>
					<td>{$ret.re_count}</td>
					<td><a href="{url app=order&act=return_goods_view&order_id=$ret.order_id}">{$lang.ret_status.$ret.re_status}</a></td>
					<td>{$ret.re_money}</td>
				</tr>
				<!--{/foreach}-->
				<tr>
					<th>扣款总额：</th>
					<td colspan="7">&nbsp;</td>
					<td>{$ret_total.recon_return_price|default:0}<input name="recon_return_price" value="{$ret_total.recon_return_price|default:0}" type="hidden" /></td>
				</tr>
			</tbody>
		</table>
		
		<div style="margin: 5px 5px">&nbsp;&nbsp;</div>
		<table cellspacing="0" cellpadding="0" id="tab-color2" class="tab-display" style="width: 800px">
			<tr>
				<td width="15%">其它扣款说明:</td>
				<td colspan="8"><textarea name="recon_demo" rows="4" style="width: 100%" {if $user.role==USER_FACTORY || $recons.recon_status}readonly="readonly"{/if}>{$recons.recon_demo}</textarea></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;</td>
				<td colspan="8" style="text-align: right;">金额：<input name="other_price" value="{$recons.other_price}" type="text" {if $user.role==USER_FACTORY || $recons.recon_status}readonly="readonly"{/if} /></td>
			</tr>
			<tr>
				<td colspan="9"><h3>本期实际支付金额:{$last_amount|price}</h3></td>
			</tr>
		</table>
		
		<div style="margin: 5px 5px">&nbsp;&nbsp;</div>
		<table cellspacing="0" cellpadding="0" id="tab-color2" class="tab-display" style="width: 800px">
			<tbody>
				<tr>
					<td colspan="2"><h3>{$lang.bank_info}</h3></td>
				</tr>
				<tr>
					<td align="right" width="10%">{$lang.bank_account}:</td>
					<td align="left">{$factory_info.bank_account}</td>
				</tr>
				<tr>
					<td align="right" width="10%">{$lang.bank_user}:</td>
					<td align="left">{$factory_info.bank_user}</td>
				</tr>
				<tr>
					<td align="right" width="10%">{$lang.bank_name}:</td>
					<td align="left">{$factory_info.bank_name}</td>
				</tr>
			</tbody>
		</table>
		<!-- {if $smarty.get.act neq 'print_recon'} -->
		<div style="margin-top:10px;text-align: center;padding-bottom: 12px">
			<!-- {if $user.role==USER_FINANCE} -->
			<input name="sub_recon" type="submit" value="保存" class="btn-2" />
			<input name="sub_recon" type="submit" value="已付款" class="btn-2" onclick="if(confirm('您确定要支付此对账单吗?')!=true){return false;}" />
			<!-- {/if} -->
			<input name="print_recon" type="button" value="打印" class="btn-2" onClick="javascript:window.open('{url app=reconlist&act=print_recon&recon_id=$recons.recon_id}');" />
			<input type="button" class="btn-2" value="返回" onClick="history.back();" />
		</div>
		<!-- {/if} -->
		</form>
	</div>
	
</div>
<script language="JavaScript">
$(function(){
	var act="{$smarty.get.act}"
	if(act=='print_recon'){
		print();
	}
});
<!--{if $search}-->
$(function(){
var get_para={$get_para};
$.each(get_para,function(k,v){
if($('#'+k)){
$('#'+k).attr('value', v);
}
})
});
<!--{/if}-->
</script>
</body>
{$async_sendmail}
</html>
